In the field of computer-generated graphics, shadow mapping is a technique for rendering shadows in a scene. Typically, shadow mapping is performed on scenes in which objects are represented as multiple, adjacent polygons (usually triangles). To perform shadow mapping, a scene is rasterized from the view point of a light source that creates the shadows. A shadow map is constructed from this rasterization, commonly as a texture that contains the depth information of the scene. Thereafter, the scene is rendered from the view point of the viewer/camera by projecting the rasterized object fragments on to the shadow map, and comparing the depth of the fragments to determine whether the fragments are within the shadow relative to the light source.
In contrast to alternate techniques such as ray tracing and shadow volume, shadow mapping requires significantly less overhead. However, conventional shadow mapping techniques also suffer from drawbacks of their own. One of the major problems with conventional shadow mapping techniques is that the shadow map texture—which contains the geometry of the scene as it is rasterized from the view point of the light source—has a finite resolution. As such, the size and depth of the shadow map determines the quality of the final shadows rendered. Under certain (common) circumstances, this resolution may not be enough to provide the finer details of the outline of the shadow. When the resolution is insufficient, aliasing and/or shadow continuity glitches may occur. In particular, aliasing artifacts may arise near the boundaries between shadows and light.
Various solutions have been proposed to reduce boundary artifacts. One approach is based on re-parameterizing the shadow map, such that more samples are available in the places that are needed (e.g., boundaries). Unfortunately, re-parameterization techniques are limited in that the total amount of available samples is fixed by the scene, and may not be sufficient in all circumstances. These techniques tend to reduce, but not eliminate, the aliasing artifacts. Other solutions include using irregular texturing and z-buffering, thereby effectively achieving infinite shadow map resolution. However, these shadow maps have to be recomputed for each new view point or position, which can be resource and time-intensive when the view point changes frequently.
Recently, approaches have been developed which have been based on so-called geometry shadow maps. Under these approaches, instead of storing rasterized scene geometry, each shadow map texel contains a list of triangles whose projections on the light image plane at least partially overlap with this texel. During rendering, the shadow ray visibility tests can be exact because it is done against the actual triangles. However, existing implementations of the geometry shadow map approach rely on software rasterizers implemented with the CUDA parallel processing platform to construct the per-texel triangle lists.